<template>
  <div class="search">
    <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="input1" v-if="showSearch.input">
    </el-input>
    <el-select v-model="selectValue" :placeholder="selectContext" v-if="showSearch.select">
      <el-option v-for="(item,index) in selectOptions" :key="index" :label="item" :value="item">
      </el-option>
    </el-select>
    <el-button type="primary" @click="searchTable(input1,selectValue)">搜索</el-button>
  </div>
</template>

<script>
export default {
  props: ['searchTable', 'showSearch', 'selectOptions'],
  data () {
    return {
      input1: '',
      selectValue: '',
      selectContext: '请选择宿舍',
    };
  },
  methods: {

  },
};
</script>

<style scoped>
.search{
  margin-bottom: 20px;
}
.el-input{
  width: 200px;
}
.el-select{
  margin-left: 20px;
}
.el-button{
  margin-left: 20px;
}
</style>
